<extend name="Layout:layout_dialog" />
<block name="body_main">
    <form action="{:U('conf_edit_save')}" method="post" class="xsui-form">
        <fieldset>
            <div class="xsui-form-field">
                <label>名称：</label>
                <if condition="$data['id']">
                    {$data.name}
                    <else/>
                <input type="text" name="conf_name" placeholder="配置名称" value="{$data.conf_name}" required="required" />
                </if>
            </div>
            <div class="xsui-form-field">
                <label>标题：</label>
                <input type="text" name="title" placeholder="配置标题" value="{$data.title}" required="required" />
            </div>
            <div class="xsui-form-field">
                <label>类型：</label>
                <sohtml:select name="conf_type" items="C:字符;N:数字;T:文本;A:数组;E:枚举" value="{$data.conf_type}" required="required" />
            </div>
            <div class="xsui-form-field">
                <label>分组：</label>
                <sohtml:select name="conf_group" items="B:基本;C:内容;U:用户;S:系统" value="{$data.conf_group}" required="required" />
            </div>
            <div class="xsui-form-field">
                <label>配置内容：</label>
                <textarea name="content" placeholder="格式：值:标题(每项一行)" cols="45" rows="5" style="vertical-align: top;">{$data.content}</textarea>
            </div>
            <div class="xsui-form-field">
                <label>配置值：</label>
                <input type="text" name="lcontent" value="{$data.lcontent}" placeholder="配置值" />
            </div>
            <div class="xsui-form-field">
                <label style="vertical-align: top;">配置说明：</label>
                <textarea name="remark" placeholder="配置说明" cols="45" rows="5" style="vertical-align: top;">{$data.remark}</textarea>
            </div>
            <div class="xsui-form-field">
                <label>状态：</label>
                <sohtml:radio name="status" items="1:正常;0:禁用" value="{$data.status|default=0}" required="required" />
            </div>
        </fieldset>
        <button type="submit" class="xsui-btn ui-state-default"><i class="fa fa-save fw"></i>保存</button>
        <button type="reset" class="xsui-btn ui-state-default"><i class="fa fa-undo fw"></i>重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
        <input type="hidden" name="site_id" value="{$data.site_id}"/>
        <input type="hidden" name="user_name" value="{$data.user_name}"/>
    </form>
</block>